﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Himp.Outpatient.Migrations
{
    /// <inheritdoc />
    public partial class add_table_OtpAppyForm : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "OtpAppyForm",
                schema: "Outpatient",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    OtpMdtrtRecId = table.Column<Guid>(type: "uuid", nullable: false),
                    OtpRxRecId = table.Column<Guid>(type: "uuid", nullable: false),
                    AppyNo = table.Column<string>(type: "text", nullable: false),
                    AppyDocName = table.Column<string>(type: "text", nullable: false),
                    AppyDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    AppyDeptCodg = table.Column<string>(type: "text", nullable: false),
                    AppyDeptName = table.Column<string>(type: "text", nullable: false),
                    BilgDrCodg = table.Column<string>(type: "text", nullable: false),
                    BilgDrName = table.Column<string>(type: "text", nullable: false),
                    AppyRecStas = table.Column<int>(type: "integer", nullable: false),
                    ExecDeptCodg = table.Column<string>(type: "text", nullable: false),
                    ExecDeptName = table.Column<string>(type: "text", nullable: false),
                    SpcmTypeCodg = table.Column<string>(type: "text", nullable: true),
                    SpcmTypeName = table.Column<string>(type: "text", nullable: true),
                    Illhis = table.Column<string>(type: "text", nullable: true),
                    IsUrgentFlag = table.Column<bool>(type: "boolean", nullable: false),
                    ExamPart = table.Column<string>(type: "text", nullable: true),
                    AppyOrgName = table.Column<string>(type: "text", nullable: true),
                    ExeOrgName = table.Column<string>(type: "text", nullable: true),
                    ChkDrCodg = table.Column<string>(type: "text", nullable: true),
                    ChkDrName = table.Column<string>(type: "text", nullable: true),
                    ChkTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    ValiFlag = table.Column<bool>(type: "boolean", nullable: false),
                    TenantId = table.Column<Guid>(type: "uuid", nullable: true),
                    ExtraProperties = table.Column<string>(type: "text", nullable: false),
                    ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
                    CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uuid", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OtpAppyForm", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "OtpAppyForm",
                schema: "Outpatient");
        }
    }
}
